package com.buyouchina.service.product.impl;


import java.util.List;

import org.springframework.stereotype.Service;

import com.buyouchina.bean.product.Record;
import com.buyouchina.service.base.DaoSupport;
import com.buyouchina.service.product.RecordService;


@Service
public class RecordServiceBean extends DaoSupport<Record> implements RecordService{

	String hql;
	
	@SuppressWarnings("unchecked")
	public List<Record> findByPid(Integer pid){
		hql="select r from Record r where r.product.id=?1";
		return em.createQuery(hql).setParameter(1, pid).getResultList();
	}
	

}
